package world.ai;

import world.World;

/**
 * interfaces each user AI with the world class, implements query and
 * action order operations by the user AIs
 * <br><br>
 * note: in future versions, each AI will be run a timed thread. after the threads
 * time expires, it will be interrupted if it has no finished; this will mean future
 * version of the game will require fairly efficient AIs
 * @author jack
 *
 */
public abstract class AI
{
	private World w;
	
	/**
	 * called by the world to initiate an update
	 * @param tdiff
	 */
	public void updateAI(double tdiff)
	{
		
	}
	/**
	 * passes an instance of the game world to the AI for use in internal methods,
	 * this hides the actual world reference from clients makig user AIs
	 * <br><br>
	 * this method should be called once just after object instantiation
	 * @param w
	 */
	public void setWorld(World w)
	{
		this.w = w;
	}
}
